import FormItem, { FormItemProps } from '@/components/form-item';
import { InputNumber, InputNumberProps } from 'antd';
import { FC } from 'react';

export interface InputItemProps extends FormItemProps {
  inputNumberProps?: InputNumberProps;
}

const InputNumberItem: FC<InputItemProps> = ({ inputNumberProps, ...restProps }) => (
  <FormItem {...restProps}>
    <InputNumber
      placeholder="请输入"
      autoComplete="off"
      style={{ width: '100%' }}
      {...inputNumberProps}
    />
  </FormItem>
);

export default InputNumberItem;
